package com.shioirikukuri.service.impl;

import com.shioirikukuri.entity.ServiceType;
import com.shioirikukuri.mapper.ServiceTypeMapper;
import com.shioirikukuri.service.IServiceTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ServiceTypeServiceImpl implements IServiceTypeService {

	@Autowired
	private ServiceTypeMapper serviceTypeMapper;

	@Override
	public List<ServiceType> getAllServiceTypes() {
		return serviceTypeMapper.selectAllServiceTypes();
	}

	@Override
	public ServiceType getServiceTypeById(Integer serviceId) {
		return serviceTypeMapper.selectServiceTypeById(serviceId);
	}

	@Override
	public void createServiceType(ServiceType serviceType) {
		serviceTypeMapper.insertServiceType(serviceType);
	}

	@Override
	public void updateServiceType(ServiceType serviceType) {
		serviceTypeMapper.updateServiceType(serviceType);
	}

	@Override
	public void deleteServiceTypeById(Integer serviceId) {
		serviceTypeMapper.deleteServiceTypeById(serviceId);
	}
}
